//
//  LanguageCell.m
//  Community-for-college
//
//  Created by 梁海洋 on 2016/12/6.
//  Copyright © 2016年 彭鑫. All rights reserved.
//

#import "LanguageCell.h"

@implementation LanguageCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


/**
 *  cell的初始化方法，一个cell只会调用一次
 *  一般在这里添加所有可能显示的子控件，以及子控件的一次性设置
 */
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = [UIColor clearColor];
        // 点击cell的时候不要变色
//        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        //支持的语言
        _languageLabel = [[UILabel alloc]initWithFrame:(CGRectMake(15, 10, 150, 30))];
//        _languageLabel.backgroundColor = [UIColor brownColor];
        [self.contentView addSubview:_languageLabel];
        
        //国旗
        _flagLabel = [[UILabel alloc]initWithFrame:(CGRectMake(200, 10, 40, 30))];
//        _flagLabel.backgroundColor = [UIColor cyanColor];
        [self.contentView addSubview:_flagLabel];
        
        //选择的语言
        _selectLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(_flagLabel.frame) + 10, 10, 40, 30))];
        _selectLabel.text = @"✅";
        [self.contentView addSubview:_selectLabel];
        
    }
    return self;
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
